Python
·2 mins
Table of Contents
Go To References #
- TheAlgorithms | Python - Python implementation of common algorithms
- Tutorials | CherryPy - Great working examples of to get started with CherryPy quickly
- michaeloliverx | python-poetry-docker-example - Sample FastAPI app with multi-stage Docker builds using Poetry
- Variable Scope (Elmer de Looff) | Storing and verifying passwords with SQLAlchemy - Great write up detailing hashing and storing passwords. Created a Github gist with updates from Python 3.12.
Videos #
- Python Tutorials | Corey Schafer - 143 videos! Hands down – Corey has one of THE BEST python channels on Youtube. This playlist is absolutely amazing, and contains all you need to start learning python from scratch. The comments section on his videos proves how good of a teacher he is!
- Pandas Tutorials | Corey Schafer - 11 videos on how to use Pandas to explore and play with data
- Matplotlib Tutorials | Corey Schafer - 11 videos on how to use Matplotlib to visualize data
- Python Features | ArjanCodes - 19 videos. Arjan has a great channel as well – this playlist reviews key features in python
- Software Design in Python | ArjanCodes - 38 videos on designing properly in python
- 7 Python Code Smells: Olfactory Offenses To Avoid At All Costs | ArjanCodes - Great explanation of various levels of code smells along with live refactoring
- Imprecise types -> use enum instead of a generic string
- Duplicate code -> create generic / reusable function
- Not using available built-in functions -> use list comprehension instead of writing for loop on an array
- Vague identifiers -> rename variables with units (e.g.
amount
becomeshours_worked
) - Using
isinstance
to separate behavior for subtypes -> logic is in wrong place; instead use inheritance to call the subtype’s implementation (e.g.company.pay_employee(company.emp[0])
becomescompany.emp[0].pay()
) - Using boolean flags to make a method do 2 different things -> separate into multiple, smaller scoped functions
- Catching and then ignoring exceptions -> either do something or remove try/except
- (BONUS): Throwing built-in Errors -> create custom Error class to provide more details back regarding the specific error (like values along with the message)
- More Python Code Smells: Avoid These 7 Smelly Snags | ArjanCodes
- Even More Code Smells - Purge These 7 Python Putrid Peccadilloes Now! | ArjanCodes
- How to create a great dev environment with Docker | Patrick Loeber